<!DOCTYPE html>
<html lang="en">
<!-- Mirrored from www.zi-han.net/theme/hplus/login_v2.html by HTTrack Website Copier/3.x [XR&CO'2014], Wed, 20 Jan 2016 14:19:49 GMT -->
<head>
<meta charset="utf-8"></meta>
<meta name="viewport"
	content="width=device-width, initial-scale=1.0, maximum-scale=1.0"></meta>
<title>秀视频后台管理系统 - 登录</title>
<meta name="keywords" content=""></meta>
<meta name="description" content=""></meta>
<link th:href="@{/static/css/bootstrap.min.css}" rel="stylesheet"></link>
<link th:href="@{/static/css/font-awesome.min93e3.css?v=4.4.0}"
	rel="stylesheet"></link>
<link th:href="@{/static/css/animate.min.css}" rel="stylesheet"></link>
<link th:href="@{/static/css/style.min.css}" rel="stylesheet"></link>
<link th:href="@{/static/css/login.min.css}" rel="stylesheet"></link>
<!--[if lt IE 9]>
    <meta http-equiv="refresh" content="0;ie.html" />
    <![endif]-->
    
<script>
	if (window.top !== window.self) {
		window.top.location = window.location
	};
</script>
<script type="text/javascript">
	function changeCode() {
		//点击刷新验证码
		var img = document.getElementsByTagName("img")[0];
		img.src = "../other/imageCode.do?" + new Date().getTime();
	}
</script>

</head>
<body class="signin">
	<div class="signinpanel">
		<div class="row">
			<div class="col-sm-7">
				<div class="signin-info">
					<div class="logopanel m-b">
						<h1>秀视频后台管理系统</h1>
					</div>
					<div class="m-b"></div>
					<h4>
						欢迎使用 <strong>秀视频后台管理系统</strong>
					</h4>
				</div>
			</div>
			<div class="col-sm-5">
				<form id="myform" method="post">
					<h4 class="no-margins">登录：</h4>
					<p class="m-t-md">登录到秀视频平台</p>
					<input type="text" name="username" class="form-control uname"
						placeholder="用户名" /> <input type="password" name="password"
						class="form-control pword m-b" placeholder="密码" />
					<div>
						<input
							style="width: 100px; height: 30px; color: black; font-size: 14px"
							type="text" id="user_input_verifyCode" placeholder="验证码"
							name="verifyCode" /> <img width="100" height="40"
							th:src="@{/other/imageCode.do}" id="verifyCodeImage"
							onclick="changeCode()" /> <span> <a
							id="changeVerifImageRegister" onclick="changeCode()"><br />换一张</a>
						</span>
					</div>
					<a href="#">忘记密码了？</a>
					<button class="btn btn-success btn-block" type="button"
						onclick="loginSubmit()">登录</button>
					<p style="color: red" id="message"></p>
				</form>
			</div>
		</div>
		<div class="signup-footer">
			<div class="pull-left">&copy; 2018 .</div>
		</div>
	</div>
</body>

<script th:src="@{/static/js/jquery-2.1.1.min.js}"></script>
<script type="text/javascript">
	//登出
	function loginSubmit() {
		$.ajax({
			url : '../adminUser/loginSubmit',
			data : $('#myform').serialize(),
			type : 'post',
			dataType : 'json',
			success : function(res) {
				if (res.status == 200) {
					window.location.href = "../index";
				} else {
					changeCode();
					document.getElementById("message").innerText = res.msg;
				}
			},
			error : function(error) {
				console.info(error);
			}
		})
	}
</script>
</html>
